# vim: set filetype=py
 
Import('dev source_path')

env, target, sources = dev.prepare_build(source_path, 'testxml', source_glob='testxml.cpp', in_bin=False)

if env['CC'] == 'cl': # MSVC
	if dev.mode == 'debug':
		env.Prepend(LIBS = ['ssleay32d', 'libeay32d'])
	else:
		env.Prepend(LIBS = ['ssleay32', 'libeay32'])
else:
	env.Prepend(LIBS = ['ssl', 'crypto'])
	env.Append(CPPPATH = ['#/htmlhelp/include/'])
	env.Append(LIBPATH = ['#/htmlhelp/lib/'])
	
env.Append(LIBS=["comctl32", "ws2_32", "ole32", "gdi32", "comdlg32", "winmm", "shlwapi", "htmlhelp", "oleaut32", "uuid"])
env.Append(CPPPATH=['#/openssl/include', "#/dwt/include", "#/"])
openssl_lib = '#/openssl/lib/'

if env['arch'] != 'x86':
	openssl_lib += env['arch'] + '/'
env.Append(LIBPATH=[openssl_lib])

ret = env.Program(target, [sources, dev.client, dev.zlib, dev.bzip2, dev.dwt, dev.intl])
Return('ret')

